package com.sf.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sf.domain.Refund;
import com.sf.mapper.AppointmentMapper;
import com.sf.service.AppointmentService;
import org.springframework.stereotype.Service;

@Service
public class AppointmentServiceImpl extends ServiceImpl<AppointmentMapper, Refund> implements AppointmentService {
    @Override
    public Refund getOne(Refund refund) {
        LambdaQueryWrapper<Refund> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Refund::getRefundReason, refund.getRefundReason());
        queryWrapper.eq(Refund::getCustomerPhone, refund.getCustomerPhone());
        queryWrapper.eq(Refund::getOrderNumber, refund.getOrderNumber());

        Refund refund1 = baseMapper.selectOne(queryWrapper);

        return refund1;

    }
}
